/**
 * Created by Administrator on 2017/2/27.
 */
var SideBar = require('../../src/complex/sideBar');

var Root = React.createClass({
    getInitialState: function () {
        return{
            sideBarItem:PageDM.sideBar.value
        }
    },
    componentDidMount: function(){
        UEventHub.emit("pageLoad","hello world!");
    },
    showAnswer: function(e){
        var obj = e.srcElement || e.target;
        if(obj.parentNode.nextSibling.style.display=='block'){
            obj.parentNode.className = 'panel-title';
            obj.parentNode.nextSibling.style.display = 'none';
        }else{
            obj.parentNode.className = 'panel-title show';
            obj.parentNode.nextSibling.style.display = 'block';
        }
    },
    render: function() {
        return (
            <div>
                <div className="mod-account container">
                    <div className="sub-nav">
                        <SideBar sideBarItem={this.state.sideBarItem}/>
                    </div>
                    <div className="account padding">
                        <div className="help-main">
                            <div className="mod-title title"><b></b>兑付问题<b></b></div>
                            <div className="panel-problem">
                                <div className="panel-group">
                                    <div className="panel">
                                        <div className="panel-title"> <b className="iconfont icon-wh"></b> <a href="javascript:;" className="collapse" onClick={this.showAnswer}>投资项目成功后，项目什么时候会进行返还我的本金及收益？</a> <div className="angle"><span></span></div></div>
                                        <div className="panel-content">
                                            当项目正常兑付时，在 “项目到期日”后的1-3个工作日（具体以项目说明为准），平台会把投资本金及收益兑付至投资人绑定的回款账户里。
                                        </div>
                                    </div>
                                    <div className="panel">
                                        <div className="panel-title"> <b className="iconfont icon-wh"></b> <a href="javascript:;" className="collapse" onClick={this.showAnswer}>项目兑付时是一次性还清本金和收益吗？</a> <div className="angle"><span></span></div></div>
                                        <div className="panel-content">
                                            是的。当项目正常兑付时，平台会一次性兑付投资人的本金和本次投资的收益。
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div className="clear"></div>
                        </div>
                    </div>
                    <div className="clear"></div>
                </div>
            </div>
        )
    }
});
ReactDOM.render(<Root/>, document.getElementById('giraffe'));